@extends('Admin/index/index')
@section('content')
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">用户修改</h1>
    <div class="col-lg-6 col-lg-offset-3">
           @if (count($errors) > 0)
            <div class="alert alert-danger">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif
        <form role="form" action="{{url('admin/user/update')}}" method="post" enctype="multipart/form-data">
            <div class="form-group">
                <label>用户名</label>
                <input class="form-control" type="text" name="username" value="{{$user->username}}">
                <p class="help-block"></p>
            </div>
            <div class="form-group">
                <label>年龄</label>
                <input class="form-control"  type="text" name="age" value="{{$user->age}}">
                <p class="help-block"></p>
            </div>
            <div class="form-group">
                <label>手机号</label>
                <input class="form-control" type="text" name="phone" value="{{$user->phone}}">
                <p class="help-block"></p>
            </div>
            <div class="form-group">
                <label>头像</label>
                <input  type="file" name="pic">
                <img src="/uploads/{{$user->pic}}" alt="头像加载失败" style="width: 50px;height: 50px;">
                <p class="help-block"></p>
            </div>
            <input type="hidden" name="id" value="{{$user->id}}">
            {{csrf_field()}}
            <center>
            <button class="btn btn-primary" type="submit">用户修改</button>
            <button type="reset" class="btn btn-info">重置</button>
            <center>
        </form>
    </div>
</div>
</div>
</div>
@endsection